<template>
	<view class="container">
		<view class="welcome">
			<text>欢迎来到小饭桌</text>
			<view class="summary">
				<text>每天大家投票选餐</text>
			</view>
		</view>
		<view class="input-container">
			<input type="text" v-model="username" placeholder="输个名" />
		</view>
		<view class="input-container">
			<input type="password" v-model="password" placeholder="密码" />
		</view>
		<view class="button">
			<button type="primary">进入</button>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'login',
		data() {
			return {
				username: '',
				password: ''
			}
		},
		methods: {
			commit() {
				if (!this.username.trim() || !this.password) {
					uni.showToast({
						title: '请输入账号或密码',
						icon: 'none'
					})
				}
			}
		}
	}
</script>

<style scoped lang="scss">
	.container {
		box-sizing: border-box;
		width: 750rpx;
		height: 100vh;
		background-color: #FFF;
		padding: 120rpx 30rpx 0;
	}
	.input-container {
		display: flex;
		flex-direction: row;
		margin-bottom: 50rpx;
		input {
			flex: 1;
			box-sizing: border-box;
			padding-left: 10rpx;
			line-height: 80rpx;
			height: 80rpx;
			font-size: 28rpx;
			border-bottom: 1rpx solid #CCC;
		}
		.label {
			margin-right: 30rpx;
		}
		&:first-child {
			margin-top: 50rpx;
		}
	}
	.welcome {
		width: 100%;
		margin: 0 0 40rpx;
		font-size: 50rpx;
		color: #222;
		font-weight: 700;
		.summary {
			margin-top: 30rpx;
			font-size: 28rpx;
			color: #888;
			font-weight: 400;
		}
	}
	.button {
		margin-top: 100rpx;
	}
</style>
